package com.hs.hlw.credit.system.common.util;

/**
 * BeanUtils
 * @author zhb
 * @date 2018/10/29
 */
public class BeanUtil {
    /**
     * 转换
     * @param from
     * @param to
     * @param <T>
     * @return
     */
    public static <T> T chang(Object from, Class<T> to) {
        if (from == null) {
            return  null;
        } else {
            return JsonUtil.fromJson(JsonUtil.toJson(from), to);
        }
    }
}